<script setup lang="ts">
import { delay } from "@/utils";
import { onMounted, reactive } from "vue";
const state = reactive({ str: "." });

const start = async () => {
  state.str += ".";
  if (state.str.length > 5) {
    state.str = ".";
  }
  await delay(300);
  start();
};

onMounted(() => {
  start();
});
</script>

<template>
  <span>
    {{ state.str }}
  </span>
</template>
